package spark.stream.kafka;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;

/**
 * Author 李岩飞
 * Email eliyanfei@126.com
 * 2017/12/18
 */
public class Order implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    //订单商品名称
    private String name;
    //订单价格
    private Float price;


    public Order() {
        super();
    }

    public Order(String name, Float price) {
        super();
        this.name = name;
        this.price = price;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Float getPrice() {
        return price;
    }
    public void setPrice(Float price) {
        this.price = price;
    }
    @Override
    public String toString() {
        return "Order [name=" + name + ", price=" + price + "]";
    }

    public static void main(String[] args) {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DATE,-20);
        System.out.println(cal.getTimeInMillis());
        System.out.println(new Date(1513205396810l).toLocaleString());
    }
}